Skip to content

chore(tsconfig.json): narrow 'include' pattern to prevent TS6053 race conditions from tsup bundled config files#10522

Merged
sukvvon merged 9 commits intomainfrom
chore/tsconfig-exclude-tsup-bundled-files
May 3, 2026
Merged

chore(tsconfig.json): narrow 'include' pattern to prevent TS6053 race conditions from tsup bundled config files#10522
sukvvon merged 9 commits intomainfrom
chore/tsconfig-exclude-tsup-bundled-files

Conversation

@sukvvon
Copy link
Copy Markdown
Collaborator

@sukvvon sukvvon commented Apr 19, 2026

🎯 Changes

Narrow the include pattern in all packages/*/tsconfig.json files from *.config.* to explicit *.config.ts and *.config.js.

Why

tsup bundles tsup.config.ts into a temporary ESM file named tsup.config.bundled_<random>.mjs before loading it. This temporary file exists on disk for a few milliseconds during tsup builds.

All package tsconfigs use "include": ["*.config.*", ...], which is too broad and matches this temporary file. When Nx runs multiple tasks in parallel (e.g., build and test:types), the TypeScript compiler may enumerate the temporary file, but by the time it tries to read it, tsup has already deleted it. This results in intermittent CI failures such as:

error TS6053: File '/.../packages/query-devtools/tsup.config.bundled_<random>.mjs' not found.

Fix

Instead of relying on exclude to filter out tsup's temporary files, narrow the include pattern itself to only match config files with the extensions actually used in the repo: .ts and .js. This way, any temporary file with an unexpected name (e.g., *.bundled_<random>.mjs) is naturally excluded.

This approach is:

  • More robust — automatically handles other build tools that produce similar temporary files (e.g., tsdown)
  • More explicit — declares exactly which config extensions are valid
  • Simpler — no need for an additional exclude entry

If .mjs or .cjs config files are added in the future, they can be added to the include array as a deliberate, scoped change.

Real CI failures

Scope

Applied to all 26 packages using the *.config.* include pattern, for consistency.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with `pnpm run test:pr`.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • Chores
    • Standardized TypeScript project includes across packages to explicitly list supported config file extensions (TS/JS and common module variants) and reformatted include blocks. This narrows which config files are considered and improves build consistency, reducing accidental file pickup and making compilation inputs more predictable.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 19, 2026

Caution

Review failed

The head commit changed during the review from 2b16070 to c38d48d.

📝 Walkthrough

Walkthrough

Updated 25 package tsconfig.json files to narrow config-file include globs from *.config.* to explicit extensions (e.g., *.config.{ts,js,mjs,cjs} or separate *.config.ts/*.config.js) and reformatted some include arrays to multi-line lists. No other compiler options or public declarations changed.

Changes

TypeScript include/glob updates

Layer / File(s) Summary
Config Pattern
packages/*/tsconfig.json (see list below)
Replaced broad *.config.* with explicit extension globs such as *.config.{ts,js,mjs,cjs} or separate *.config.ts / *.config.js.
Formatting / Readability
packages/*/tsconfig.json
Rewrote single-line include arrays into multi-line arrays where present (explicitly listing src, test-setup.ts, config globs, package.json).
Unchanged areas
packages/*/tsconfig.json
No changes to compilerOptions, outDir, rootDir, references, or exported/public declarations.
Files changed (all packages)
packages/angular-query-experimental/tsconfig.json, packages/angular-query-persist-client/tsconfig.json, packages/eslint-plugin-query/tsconfig.json, packages/preact-query-devtools/tsconfig.json, packages/preact-query-persist-client/tsconfig.json, packages/preact-query/tsconfig.json, packages/query-async-storage-persister/tsconfig.json, packages/query-broadcast-client-experimental/tsconfig.json, packages/query-codemods/tsconfig.json, packages/query-core/tsconfig.json, packages/query-devtools/tsconfig.json, packages/query-persist-client-core/tsconfig.json, packages/query-sync-storage-persister/tsconfig.json, packages/query-test-utils/tsconfig.json, packages/react-query-devtools/tsconfig.json, packages/react-query-next-experimental/tsconfig.json, packages/react-query-persist-client/tsconfig.json, packages/react-query/tsconfig.json, packages/solid-query-devtools/tsconfig.json, packages/solid-query-persist-client/tsconfig.json, packages/solid-query/tsconfig.json, packages/svelte-query-devtools/tsconfig.json, packages/svelte-query-persist-client/tsconfig.json, packages/svelte-query/tsconfig.json, packages/vue-query-devtools/tsconfig.json, packages/vue-query/tsconfig.json
All affected tsconfig.json files updated as described above.

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly Related PRs

Poem

🐰 I hopped through packages, tidy and spry,
Replaced wide wildcards with glints in each eye,
TS knows its files, precise and neat,
Multiline includes make the list complete,
A small pruning dance — the monorepo's sigh.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: narrowing tsconfig.json include patterns to fix TS6053 race conditions caused by tsup's temporary bundled config files.
Description check ✅ Passed The description follows the template structure with a comprehensive explanation of changes, motivation, fix rationale, scope, and completed checklist items.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/tsconfig-exclude-tsup-bundled-files

Review rate limit: 3/5 reviews remaining, refill in 15 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Apr 19, 2026

View your CI Pipeline Execution ↗ for commit 60be407

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 52s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2026-05-03 16:19:33 UTC

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 19, 2026

🚀 Changeset Version Preview

No changeset entries found. Merging this PR will not cause a version bump for any packages.

@sukvvon sukvvon self-assigned this Apr 19, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 19, 2026

More templates

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@10522

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@10522

@tanstack/preact-query

npm i https://pkg.pr.new/@tanstack/preact-query@10522

@tanstack/preact-query-devtools

npm i https://pkg.pr.new/@tanstack/preact-query-devtools@10522

@tanstack/preact-query-persist-client

npm i https://pkg.pr.new/@tanstack/preact-query-persist-client@10522

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@10522

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@10522

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@10522

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@10522

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@10522

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@10522

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@10522

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@10522

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@10522

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@10522

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@10522

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@10522

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@10522

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@10522

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@10522

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@10522

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@10522

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@10522

commit: c38d48d

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 19, 2026

size-limit report 📦

Path Size
react full 12.1 KB (0%)
react minimal 9.07 KB (0%)

@sukvvon
Copy link
Copy Markdown
Collaborator Author

sukvvon commented May 3, 2026

Confirming this fix is needed — PR #10629 just hit the exact same TS6053 error in CI: https://github.com/TanStack/query/actions/runs/25282211546/job/74121119451

error TS6053: File '/.../packages/query-devtools/tsup.config.bundled_kw8jt83pcno.mjs' not found.
  Matched by include pattern '*.config.*' in '/.../packages/query-devtools/tsconfig.json'

@sukvvon sukvvon changed the title chore(tsconfig.json): exclude tsup bundled config files to prevent TS6053 race conditions chore(tsconfig.json): narrow 'include' pattern to prevent TS6053 race conditions from tsup bundled config files May 3, 2026
@sukvvon sukvvon marked this pull request as ready for review May 3, 2026 15:55
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/angular-query-persist-client/tsconfig.json`:
- Line 13: The include glob in tsconfig.json currently uses brace expansion
("*.config.{ts,js,mjs,cjs}") which TypeScript doesn't support; update the
include array entry to four explicit patterns instead of the brace form (e.g.,
add "*.config.ts", "*.config.js", "*.config.mjs", "*.config.cjs") so the include
in tsconfig.json correctly matches all intended config file extensions.

In `@packages/query-async-storage-persister/tsconfig.json`:
- Line 7: The tsconfig.json "include" pattern uses unsupported brace expansion
("*.config.{ts,js,mjs,cjs}") so those config files are not matched; update the
"include" array (the include property in tsconfig.json) to list each glob
separately (e.g., "*.config.ts", "*.config.js", "*.config.mjs", "*.config.cjs")
alongside "src" and "package.json" so TypeScript will actually include those
config files.

In `@packages/query-codemods/tsconfig.json`:
- Line 7: The include pattern uses unsupported brace-expansion
("*.config.{ts,js,mjs,cjs}") in the tsconfig "include" array; replace it with
explicit patterns for each extension so TypeScript will match them (e.g., add
separate entries like "*.config.ts", "*.config.js", "*.config.mjs",
"*.config.cjs" or equivalent explicit globs) by updating the "include" array
entry that currently contains "*.config.{ts,js,mjs,cjs}".

In `@packages/react-query/tsconfig.json`:
- Around line 8-13: The tsconfig.json "include" entry uses unsupported brace
expansion "*.config.{ts,js,mjs,cjs}" so those config files aren't matched;
replace the brace with separate glob entries by expanding into individual
patterns (e.g., "*.config.ts", "*.config.js", "*.config.mjs", "*.config.cjs") in
the "include" array so files like tsup.config.ts and vite.config.ts are picked
up; update the "include" array in packages/react-query/tsconfig.json
accordingly.

In `@packages/svelte-query-devtools/tsconfig.json`:
- Line 7: The tsconfig.json "include" entry uses unsupported brace expansion
("*.config.{ts,js,mjs,cjs}"); replace that single pattern with explicit glob
entries in the "include" array (e.g., "*.config.ts", "*.config.js",
"*.config.mjs", "*.config.cjs") so TypeScript will actually pick up those config
files; update the "include" array accordingly (referencing the "include" key and
the current "*.config.{ts,js,mjs,cjs}" pattern).

In `@packages/vue-query-devtools/tsconfig.json`:
- Line 7: The include pattern in tsconfig.json uses brace expansion
("*.config.{ts,js,mjs,cjs}") which TypeScript doesn't support; replace that
single brace-glob entry in the "include" array with explicit glob entries such
as "*.config.ts", "*.config.js", "*.config.mjs", and "*.config.cjs" (or a single
"*.config.*" if you want a broader match) so the config files are actually
picked up by the TypeScript compiler; update the include array entry that
currently contains the brace pattern accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f5fe14c1-e25c-4822-8a48-b77c4c3eccf2

📥 Commits

Reviewing files that changed from the base of the PR and between 8c3d523 and c1b244c.

📒 Files selected for processing (26)
  • packages/angular-query-experimental/tsconfig.json
  • packages/angular-query-persist-client/tsconfig.json
  • packages/eslint-plugin-query/tsconfig.json
  • packages/preact-query-devtools/tsconfig.json
  • packages/preact-query-persist-client/tsconfig.json
  • packages/preact-query/tsconfig.json
  • packages/query-async-storage-persister/tsconfig.json
  • packages/query-broadcast-client-experimental/tsconfig.json
  • packages/query-codemods/tsconfig.json
  • packages/query-core/tsconfig.json
  • packages/query-devtools/tsconfig.json
  • packages/query-persist-client-core/tsconfig.json
  • packages/query-sync-storage-persister/tsconfig.json
  • packages/query-test-utils/tsconfig.json
  • packages/react-query-devtools/tsconfig.json
  • packages/react-query-next-experimental/tsconfig.json
  • packages/react-query-persist-client/tsconfig.json
  • packages/react-query/tsconfig.json
  • packages/solid-query-devtools/tsconfig.json
  • packages/solid-query-persist-client/tsconfig.json
  • packages/solid-query/tsconfig.json
  • packages/svelte-query-devtools/tsconfig.json
  • packages/svelte-query-persist-client/tsconfig.json
  • packages/svelte-query/tsconfig.json
  • packages/vue-query-devtools/tsconfig.json
  • packages/vue-query/tsconfig.json

"include": [
"src",
"test-setup.ts",
"*.config.{ts,js,mjs,cjs}",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

Does TypeScript support brace expansion in tsconfig.json includeglobs (e.g.,"*.config.{ts,js,mjs,cjs}")? Please cite official TypeScript documentation or source code behavior.

💡 Result:

No. TypeScript’s tsconfig.json include/exclude glob patterns do not support Bash-style brace expansion like {ts,js,mjs,cjs}. TypeScript documents include as “filenames or patterns” and specifies only wildcard characters , ?, and / for its tsconfig globbing. The official docs list those supported wildcard characters and do not mention brace sets as a supported feature. Additionally, TypeScript’s own issue tracker documents that “curly braces aren't supported in our glob patterns” in the context of tsconfig include patterns. Practical implication: a pattern such as ".config.{ts,js,mjs,cjs}" will not be interpreted as multiple extensions by the TypeScript compiler; you need to spell out separate include patterns (e.g., ".config.ts", ".config.js", etc.) or use other mechanisms (like multiple tsconfig files / tooling) to cover those extensions.

Citations:


Brace expansion is not supported in tsconfig.json include globs—update Line 13 to use explicit patterns.

TypeScript's glob patterns in tsconfig.json support only *, ?, and / wildcards. The pattern "*.config.{ts,js,mjs,cjs}" will not be interpreted as multiple extensions; use separate entries instead to ensure all intended config files are included.

Suggested fix
   "include": [
     "src",
     "test-setup.ts",
-    "*.config.{ts,js,mjs,cjs}",
+    "*.config.ts",
+    "*.config.js",
+    "*.config.mjs",
+    "*.config.cjs",
     "package.json"
   ],
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"*.config.{ts,js,mjs,cjs}",
"include": [
"src",
"test-setup.ts",
"*.config.ts",
"*.config.js",
"*.config.mjs",
"*.config.cjs",
"package.json"
],
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/angular-query-persist-client/tsconfig.json` at line 13, The include
glob in tsconfig.json currently uses brace expansion
("*.config.{ts,js,mjs,cjs}") which TypeScript doesn't support; update the
include array entry to four explicit patterns instead of the brace form (e.g.,
add "*.config.ts", "*.config.js", "*.config.mjs", "*.config.cjs") so the include
in tsconfig.json correctly matches all intended config file extensions.

"rootDir": "."
},
"include": ["src", "*.config.*", "package.json"],
"include": ["src", "*.config.{ts,js,mjs,cjs}", "package.json"],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

In TypeScript tsconfig.json, does the includeglob syntax support brace expansion patterns like*.config.{ts,js,mjs,cjs}? Please cite official TypeScript documentation or source references for supported glob tokens.

💡 Result:

No. TypeScript’s tsconfig.json “include” glob syntax does not support brace expansion patterns like *.config.{ts,js,mjs,cjs}. Official TypeScript documentation states that “include”/“exclude” support only the wildcard characters * and ? and the special recursive token /, and it describes those as the supported glob wildcards. It does not mention brace/group expansion as supported. TypeScript’s own source for the include/exclude glob feature also lists supported tokens as , ?, and /, and explicitly notes that character escape sequences and character ranges are not supported—indicating that its glob syntax is intentionally limited rather than full brace-expansion syntax. Additionally, TypeScript maintainers have discussed brace usage not working in tsconfig patterns (e.g., curly braces not supported in glob patterns), corroborating that .{...} style expansion isn’t handled. Supported tokens (from TypeScript docs/source): - * matches zero or more characters (excluding directory separators) - ? matches any one character (excluding directory separators) - / recursively matches any subdirectory Therefore, to include multiple extensions in tsconfig.json, you need separate patterns (e.g., /.ts, /.js, etc.) rather than a single brace-expanded pattern.

Citations:


Update include pattern: brace expansion {ts,js,mjs,cjs} is not supported in TypeScript globs.

TypeScript's tsconfig.json include patterns support only *, ?, and / wildcards. The pattern *.config.{ts,js,mjs,cjs} will be treated literally and won't match any files, silently excluding intended config files from this project.

Use separate patterns instead:

"include": ["src", "*.config.ts", "*.config.js", "*.config.mjs", "*.config.cjs", "package.json"]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/query-async-storage-persister/tsconfig.json` at line 7, The
tsconfig.json "include" pattern uses unsupported brace expansion
("*.config.{ts,js,mjs,cjs}") so those config files are not matched; update the
"include" array (the include property in tsconfig.json) to list each glob
separately (e.g., "*.config.ts", "*.config.js", "*.config.mjs", "*.config.cjs")
alongside "src" and "package.json" so TypeScript will actually include those
config files.

Comment thread packages/query-codemods/tsconfig.json Outdated
"rootDir": "."
},
"include": ["src", "*.config.*", "package.json"]
"include": ["src", "*.config.{ts,js,mjs,cjs}", "package.json"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

Does TypeScript tsconfig.json includesupport brace expansion patterns like"*.config.{ts,js,mjs,cjs}"? Please answer from official TypeScript docs and list supported wildcard syntax.

💡 Result:

No. TypeScript’s official tsconfig.json include/exclude glob syntax does not support brace expansion patterns like ".config.{ts,js,mjs,cjs}". Supported wildcard syntax for include and exclude in tsconfig.json (per the TypeScript TSConfig Reference): - * matches zero or more characters (excluding directory separators) - ? matches any one character (excluding directory separators) - / matches any directory nested to any level TypeScript’s docs explicitly describe only those wildcard characters for glob patterns in include/exclude, and do not list any support for {a,b} brace expansion. Practical implication: to include multiple extensions, you must use separate patterns (for example, /.config.ts, /*.config.js, etc.) rather than {ts,js,...}.

Citations:


Brace-expansion glob syntax is not supported in TypeScript include patterns.

The pattern "*.config.{ts,js,mjs,cjs}" on Line 7 uses brace expansion, which TypeScript's glob syntax does not support. TypeScript only supports *, ?, and **/ wildcards in include and exclude fields. This means config files matching the intended pattern will not be included or type-checked. Use separate patterns for each extension instead.

Suggested fix
-  "include": ["src", "*.config.{ts,js,mjs,cjs}", "package.json"]
+  "include": [
+    "src",
+    "*.config.ts",
+    "*.config.js",
+    "*.config.mjs",
+    "*.config.cjs",
+    "package.json"
+  ]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"include": ["src", "*.config.{ts,js,mjs,cjs}", "package.json"]
"include": [
"src",
"*.config.ts",
"*.config.js",
"*.config.mjs",
"*.config.cjs",
"package.json"
]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/query-codemods/tsconfig.json` at line 7, The include pattern uses
unsupported brace-expansion ("*.config.{ts,js,mjs,cjs}") in the tsconfig
"include" array; replace it with explicit patterns for each extension so
TypeScript will match them (e.g., add separate entries like "*.config.ts",
"*.config.js", "*.config.mjs", "*.config.cjs" or equivalent explicit globs) by
updating the "include" array entry that currently contains
"*.config.{ts,js,mjs,cjs}".

Comment thread packages/react-query/tsconfig.json
"rootDir": "."
},
"include": ["src", "tests", "*.config.*", "package.json"],
"include": ["src", "tests", "*.config.{ts,js,mjs,cjs}", "package.json"],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

Does TypeScript's tsconfig.json "include" glob support brace expansion patterns like "*.config.{ts,js,mjs,cjs}"? Please provide official TypeScript documentation/source references.

💡 Result:

No. TypeScript’s tsconfig.json “include”/“exclude” glob patterns do not support brace expansion syntax like "*.config.{ts,js,mjs,cjs}". Officially, TypeScript documents that it supports only wildcard characters for tsconfig include/exclude patterns: *, ?, and / (and related rules). There is no mention of brace-expansion-style {a,b} patterns. Additionally, TypeScript’s own issue tracker records that “curly braces aren’t supported in our glob patterns”. What to do instead: spell out multiple patterns explicitly, e.g. include entries for *.config.ts, *.config.js, etc., or generate the expanded list with your tooling (since tsconfig itself won’t expand braces).

Citations:


Brace expansion in tsconfig.json include is unsupported; rewrite with explicit patterns.

TypeScript's include glob does not support brace expansion syntax. The pattern "*.config.{ts,js,mjs,cjs}" will not match config files as intended. Instead, list each extension separately.

Suggested fix
-  "include": ["src", "tests", "*.config.{ts,js,mjs,cjs}", "package.json"],
+  "include": [
+    "src",
+    "tests",
+    "*.config.ts",
+    "*.config.js",
+    "*.config.mjs",
+    "*.config.cjs",
+    "package.json"
+  ],
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/svelte-query-devtools/tsconfig.json` at line 7, The tsconfig.json
"include" entry uses unsupported brace expansion ("*.config.{ts,js,mjs,cjs}");
replace that single pattern with explicit glob entries in the "include" array
(e.g., "*.config.ts", "*.config.js", "*.config.mjs", "*.config.cjs") so
TypeScript will actually pick up those config files; update the "include" array
accordingly (referencing the "include" key and the current
"*.config.{ts,js,mjs,cjs}" pattern).

"rootDir": "."
},
"include": ["src", "*.config.*", "package.json"],
"include": ["src", "*.config.{ts,js,mjs,cjs}", "package.json"],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

TypeScript tsconfig include glob syntax: are brace patterns like "*.config.{ts,js,mjs,cjs}" supported, or are only "*", "?", and "**/" supported?

💡 Result:

No, brace patterns like ".config.{ts,js,mjs,cjs}" are not supported in TypeScript tsconfig include. Only basic glob patterns "", "?", and "/" are supported, along with special handling for "." patterns where only supported file extensions are considered. To match multiple extensions like ts, js, mjs, cjs, you must list them separately: [".config.ts", ".config.js", ".config.mjs", ".config.cjs"].

Citations:


include uses brace-glob syntax that TypeScript does not support

The pattern *.config.{ts,js,mjs,cjs} uses brace expansion, which TypeScript's include glob does not support. TypeScript only recognizes *, ?, and **/; brace patterns are treated literally and config files won't be included as intended.

Proposed fix
-  "include": ["src", "*.config.{ts,js,mjs,cjs}", "package.json"],
+  "include": [
+    "src",
+    "*.config.ts",
+    "*.config.js",
+    "*.config.mjs",
+    "*.config.cjs",
+    "package.json"
+  ],
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/vue-query-devtools/tsconfig.json` at line 7, The include pattern in
tsconfig.json uses brace expansion ("*.config.{ts,js,mjs,cjs}") which TypeScript
doesn't support; replace that single brace-glob entry in the "include" array
with explicit glob entries such as "*.config.ts", "*.config.js", "*.config.mjs",
and "*.config.cjs" (or a single "*.config.*" if you want a broader match) so the
config files are actually picked up by the TypeScript compiler; update the
include array entry that currently contains the brace pattern accordingly.

@sukvvon sukvvon merged commit 74fa05e into main May 3, 2026
8 checks passed
@sukvvon sukvvon deleted the chore/tsconfig-exclude-tsup-bundled-files branch May 3, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment